﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;

namespace IndexMarkSilverlightClient.Views.Help
{
    public partial class Menu : Page
    {
        private Frame frame = null;

        /// <summary>
        /// Констуктор
        /// </summary>
        /// <param name="frame">Ссылка на фрейм, в который будет загружаться проигрыватель. Задается а HelpMain.xaml.</param>
        public Menu(Frame frame)
        {
            InitializeComponent();
            this.frame = frame;
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void inputLink_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton b = sender as HyperlinkButton;
            frame.Content = new Player(frame, b.Content.ToString(), "DataInput.wmv");
        }

        private void documentationLink_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton b = sender as HyperlinkButton;
            frame.Content = new Player(frame, b.Content.ToString(), "Documents.wmv");
        }

        private void overviewLink_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton b = sender as HyperlinkButton;
            frame.Content = new Player(frame, b.Content.ToString(), "Overview.wmv");
        }
    }
}
